#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

const int N = 200010, M = 1000010;
int dp[N], a[N], T, n, cnt[M];
vector<int> b, r;

int main() {
	freopen("color.in", "r", stdin);
	freopen("color.out", "w", stdout);
	scanf("%d", &T);
	while (T --) {
		scanf("%d", &n);
		for (int i = 1; i <= n; i ++ ) {
			scanf("%d", &a[i]);
			cnt[a[i]] ++ ;
		}
		b.push_back(a[1]);
		
		for (int i = 1; i <= n; i ++ ) {
			
		}
	}
	return 0;
}

